3.7.20 \(\int \frac {x^{-1+m} \log ^2(f x^p)}{d+e x^m} \, dx\) [620]

Optimal. Leaf size=75 \[ \frac {\log ^2\left (f x^p\right ) \log \left (1+\frac {e x^m}{d}\right )}{e m}+\frac {2 p \log \left (f x^p\right ) \text {Li}_2\left (-\frac {e x^m}{d}\right )}{e m^2}-\frac {2 p^2 \text {Li}_3\left (-\frac {e x^m}{d}\right )}{e m^3} \]

[Out]

ln(f*x^p)^2*ln(1+e*x^m/d)/e/m+2*p*ln(f*x^p)*polylog(2,-e*x^m/d)/e/m^2-2*p^2*polylog(3,-e*x^m/d)/e/m^3

________________________________________________________________________________________

Rubi [A]
time = 0.07, antiderivative size = 75, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {2375, 2421, 6724} \begin {gather*} \frac {2 p \log \left (f x^p\right ) \text {PolyLog}\left (2,-\frac {e x^m}{d}\right )}{e m^2}-\frac {2 p^2 \text {PolyLog}\left (3,-\frac {e x^m}{d}\right )}{e m^3}+\frac {\log ^2\left (f x^p\right ) \log \left (\frac {e x^m}{d}+1\right )}{e m} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x^(-1 + m)*Log[f*x^p]^2)/(d + e*x^m),x]

[Out]

(Log[f*x^p]^2*Log[1 + (e*x^m)/d])/(e*m) + (2*p*Log[f*x^p]*PolyLog[2, -((e*x^m)/d)])/(e*m^2) - (2*p^2*PolyLog[3
, -((e*x^m)/d)])/(e*m^3)

Rule 2375

Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.))/((d_) + (e_.)*(x_)^(r_)), x_Symbol] :> Si
mp[f^m*Log[1 + e*(x^r/d)]*((a + b*Log[c*x^n])^p/(e*r)), x] - Dist[b*f^m*n*(p/(e*r)), Int[Log[1 + e*(x^r/d)]*((
a + b*Log[c*x^n])^(p - 1)/x), x], x] /; FreeQ[{a, b, c, d, e, f, m, n, r}, x] && EqQ[m, r - 1] && IGtQ[p, 0] &
& (IntegerQ[m] || GtQ[f, 0]) && NeQ[r, n]

Rule 2421

Int[(Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.))/(x_), x_Symbol] :> Simp
[(-PolyLog[2, (-d)*f*x^m])*((a + b*Log[c*x^n])^p/m), x] + Dist[b*n*(p/m), Int[PolyLog[2, (-d)*f*x^m]*((a + b*L
og[c*x^n])^(p - 1)/x), x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[p, 0] && EqQ[d*e, 1]

Rule 6724

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rubi steps

\begin {align*} \int \frac {x^{-1+m} \log ^2\left (f x^p\right )}{d+e x^m} \, dx &=\frac {\log ^2\left (f x^p\right ) \log \left (1+\frac {e x^m}{d}\right )}{e m}-\frac {(2 p) \int \frac {\log \left (f x^p\right ) \log \left (1+\frac {e x^m}{d}\right )}{x} \, dx}{e m}\\ &=\frac {\log ^2\left (f x^p\right ) \log \left (1+\frac {e x^m}{d}\right )}{e m}+\frac {2 p \log \left (f x^p\right ) \text {Li}_2\left (-\frac {e x^m}{d}\right )}{e m^2}-\frac {\left (2 p^2\right ) \int \frac {\text {Li}_2\left (-\frac {e x^m}{d}\right )}{x} \, dx}{e m^2}\\ &=\frac {\log ^2\left (f x^p\right ) \log \left (1+\frac {e x^m}{d}\right )}{e m}+\frac {2 p \log \left (f x^p\right ) \text {Li}_2\left (-\frac {e x^m}{d}\right )}{e m^2}-\frac {2 p^2 \text {Li}_3\left (-\frac {e x^m}{d}\right )}{e m^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(220\) vs. \(2(75)=150\).
time = 0.17, size = 220, normalized size = 2.93 \begin {gather*} \frac {p^2 \log ^3(x)+3 p \log ^2(x) \left (-p \log (x)+\log \left (f x^p\right )\right )+3 \log (x) \left (-p \log (x)+\log \left (f x^p\right )\right )^2-\frac {3 \left (-p \log (x)+\log \left (f x^p\right )\right )^2 \left (\log \left (x^m\right )-\log \left (d m \left (d+e x^m\right )\right )\right )}{m}-\frac {6 p \left (-p \log (x)+\log \left (f x^p\right )\right ) \left (\frac {1}{2} m^2 \log ^2(x)+\left (-m \log (x)+\log \left (-\frac {e x^m}{d}\right )\right ) \log \left (d+e x^m\right )+\text {Li}_2\left (1+\frac {e x^m}{d}\right )\right )}{m^2}+\frac {3 p^2 \left (m^2 \log ^2(x) \log \left (1+\frac {d x^{-m}}{e}\right )-2 m \log (x) \text {Li}_2\left (-\frac {d x^{-m}}{e}\right )-2 \text {Li}_3\left (-\frac {d x^{-m}}{e}\right )\right )}{m^3}}{3 e} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x^(-1 + m)*Log[f*x^p]^2)/(d + e*x^m),x]

[Out]

(p^2*Log[x]^3 + 3*p*Log[x]^2*(-(p*Log[x]) + Log[f*x^p]) + 3*Log[x]*(-(p*Log[x]) + Log[f*x^p])^2 - (3*(-(p*Log[
x]) + Log[f*x^p])^2*(Log[x^m] - Log[d*m*(d + e*x^m)]))/m - (6*p*(-(p*Log[x]) + Log[f*x^p])*((m^2*Log[x]^2)/2 +
 (-(m*Log[x]) + Log[-((e*x^m)/d)])*Log[d + e*x^m] + PolyLog[2, 1 + (e*x^m)/d]))/m^2 + (3*p^2*(m^2*Log[x]^2*Log
[1 + d/(e*x^m)] - 2*m*Log[x]*PolyLog[2, -(d/(e*x^m))] - 2*PolyLog[3, -(d/(e*x^m))]))/m^3)/(3*e)

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.92, size = 1373, normalized size = 18.31

method result size
risch \(\text {Expression too large to display}\) \(1373\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^(-1+m)*ln(f*x^p)^2/(d+e*x^m),x,method=_RETURNVERBOSE)

[Out]

-2*p^2*polylog(3,-e*x^m/d)/e/m^3-I/m*p*ln(x)*ln((d+e*x^m)/d)/e*Pi*csgn(I*f)*csgn(I*x^p)*csgn(I*f*x^p)+I/m*ln(d
+e*x^m)/e*p*ln(x)*Pi*csgn(I*f)*csgn(I*x^p)*csgn(I*f*x^p)+I/m^2*p*dilog((d+e*x^m)/d)/e*Pi*csgn(I*f)*csgn(I*f*x^
p)^2+I/m^2*p*dilog((d+e*x^m)/d)/e*Pi*csgn(I*x^p)*csgn(I*f*x^p)^2-I/m*p*ln(x)*ln((d+e*x^m)/d)/e*Pi*csgn(I*f*x^p
)^3+I/m*ln(d+e*x^m)/e*Pi*ln(f)*csgn(I*f)*csgn(I*f*x^p)^2+I/m*ln(d+e*x^m)/e*Pi*ln(f)*csgn(I*x^p)*csgn(I*f*x^p)^
2+I/m*ln(d+e*x^m)/e*p*ln(x)*Pi*csgn(I*f*x^p)^3+I/m*ln(d+e*x^m)/e*ln(x^p)*Pi*csgn(I*f)*csgn(I*f*x^p)^2+I/m*ln(d
+e*x^m)/e*ln(x^p)*Pi*csgn(I*x^p)*csgn(I*f*x^p)^2+I/m*p*ln(x)*ln((d+e*x^m)/d)/e*Pi*csgn(I*x^p)*csgn(I*f*x^p)^2-
I/m*ln(d+e*x^m)/e*ln(x^p)*Pi*csgn(I*f)*csgn(I*x^p)*csgn(I*f*x^p)-I/m^2*p*dilog((d+e*x^m)/d)/e*Pi*csgn(I*f)*csg
n(I*x^p)*csgn(I*f*x^p)-I/m*ln(d+e*x^m)/e*Pi*ln(f)*csgn(I*f)*csgn(I*x^p)*csgn(I*f*x^p)+I/m*p*ln(x)*ln((d+e*x^m)
/d)/e*Pi*csgn(I*f)*csgn(I*f*x^p)^2-I/m*ln(d+e*x^m)/e*p*ln(x)*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^4+1/2/m*ln(d+e*x^m)/e*Pi^2*csgn(I*f)*csgn(I*f*x^p)^5

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+m)*log(f*x^p)^2/(d+e*x^m),x, algorithm="maxima")

[Out]

integrate(x^(m - 1)*log(f*x^p)^2/(x^m*e + d), x)

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 108, normalized size = 1.44 \begin {gather*} \frac {{\left (m^{2} \log \left (x^{m} e + d\right ) \log \left (f\right )^{2} - 2 \, p^{2} {\rm polylog}\left (3, -\frac {x^{m} e}{d}\right ) + 2 \, {\left (m p^{2} \log \left (x\right ) + m p \log \left (f\right )\right )} {\rm Li}_2\left (-\frac {x^{m} e + d}{d} + 1\right ) + {\left (m^{2} p^{2} \log \left (x\right )^{2} + 2 \, m^{2} p \log \left (f\right ) \log \left (x\right )\right )} \log \left (\frac {x^{m} e + d}{d}\right )\right )} e^{\left (-1\right )}}{m^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+m)*log(f*x^p)^2/(d+e*x^m),x, algorithm="fricas")

[Out]

(m^2*log(x^m*e + d)*log(f)^2 - 2*p^2*polylog(3, -x^m*e/d) + 2*(m*p^2*log(x) + m*p*log(f))*dilog(-(x^m*e + d)/d
 + 1) + (m^2*p^2*log(x)^2 + 2*m^2*p*log(f)*log(x))*log((x^m*e + d)/d))*e^(-1)/m^3

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x^{m - 1} \log {\left (f x^{p} \right )}^{2}}{d + e x^{m}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**(-1+m)*ln(f*x**p)**2/(d+e*x**m),x)

[Out]

Integral(x**(m - 1)*log(f*x**p)**2/(d + e*x**m), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^(-1+m)*log(f*x^p)^2/(d+e*x^m),x, algorithm="giac")

[Out]

integrate(x^(m - 1)*log(f*x^p)^2/(x^m*e + d), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {x^{m-1}\,{\ln \left (f\,x^p\right )}^2}{d+e\,x^m} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^(m - 1)*log(f*x^p)^2)/(d + e*x^m),x)

[Out]

int((x^(m - 1)*log(f*x^p)^2)/(d + e*x^m), x)

________________________________________________________________________________________